#pragma once

#include "CGALDefinition.h"
#include "CGAL_IO_OBJ.h"

//for cgal

//for VTK
#include "vtkTetra.h"
#include "vtkpoints.h"
#include "vtkCellType.h"
#include "vtkSmartPointer.h"

//for tetgen

#ifdef MYLIB_API_EXPORT
#define MYLIB_API __declspec(dllexport)
#else
#define MYLIB_API __declspec(dllimport)
#endif


class MYLIB_API CCombinedTetrahedron
{
private:
	//typedef Polyhedron_3::Face_iterator Face_itr;

public:
	CCombinedTetrahedron(void);
	~CCombinedTetrahedron(void);

	static CCombinedTetrahedron* GetSingleton()
	{
		if (NULL == _instance.get())
		{
			_instance.reset(new CCombinedTetrahedron);
		}
		return _instance.get();
	}

public:
	void Tetrahedron_by_cgal(ModelOBJ* model);
	void Tetrahedron_by_vtk(ModelOBJ* model);
	void Tetrahedron_by_tetgen(ModelOBJ* model);

protected:
	static std::auto_ptr<CCombinedTetrahedron> _instance;
};